← Index
NYTProf Performance Profile   
For ../prof.pl
  Run on Wed Dec 14 16:10:05 2022
Reported on Wed Dec 14 16:12:58 2022

Filename(eval 436)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]
StatementsExecuted 56 statements in 1.17ms
Eval Invoked At/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm line 3
Sibling evals1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
222104µs3.48msJSON::Schema::Modern::Result::::newJSON::Schema::Modern::Result::new
11116µs18µsJSON::Schema::Modern::Result::::BEGIN@131JSON::Schema::Modern::Result::BEGIN@131
11111µs36µsJSON::Schema::Modern::Result::::BEGIN@15.337JSON::Schema::Modern::Result::BEGIN@15.337
1116µs12µsJSON::Schema::Modern::Result::::BEGIN@123JSON::Schema::Modern::Result::BEGIN@123
1116µs6µsJSON::Schema::Modern::Result::::BEGIN@20.338JSON::Schema::Modern::Result::BEGIN@20.338
1116µs13µsJSON::Schema::Modern::Result::::BEGIN@99JSON::Schema::Modern::Result::BEGIN@99
1115µs15µsJSON::Schema::Modern::Result::::BEGIN@75JSON::Schema::Modern::Result::BEGIN@75
1114µs12µsJSON::Schema::Modern::Result::::BEGIN@139JSON::Schema::Modern::Result::BEGIN@139
1114µs12µsJSON::Schema::Modern::Result::::BEGIN@163JSON::Schema::Modern::Result::BEGIN@163
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1{
222µs my $isa_check_for_formatted_5fannotations = ${$_[1]->{"\$isa_check_for_formatted_5fannotations"}};
310s my $isa_check_for_exception = ${$_[1]->{"\$isa_check_for_exception"}};
410s my $isa_check_for_valid = ${$_[1]->{"\$isa_check_for_valid"}};
510s my $coerce_for_errors = ${$_[1]->{"\$coerce_for_errors"}};
610s my $coerce_for_exception = ${$_[1]->{"\$coerce_for_exception"}};
711µs my $isa_check_for_output_5fformat = ${$_[1]->{"\$isa_check_for_output_5fformat"}};
810s my $isa_check_for_errors = ${$_[1]->{"\$isa_check_for_errors"}};
910s my $_UNQUOTED = ${$_[1]->{"\$_UNQUOTED"}};
1010s my $_QUOTED = ${$_[1]->{"\$_QUOTED"}};
1110s my $coerce_for_annotations = ${$_[1]->{"\$coerce_for_annotations"}};
1210s my $coerce_for_valid = ${$_[1]->{"\$coerce_for_valid"}};
13147µs my $isa_check_for_annotations = ${$_[1]->{"\$isa_check_for_annotations"}};
14 package JSON::Schema::Modern::Result;
15249µs261µs
# spent 36µs (11+25) within JSON::Schema::Modern::Result::BEGIN@15.337 which was called: # once (11µs+25µs) by Sub::Quote::_clean_eval at line 15
no warnings 'closure';
# spent 36µs making 1 call to JSON::Schema::Modern::Result::BEGIN@15.337 # spent 25µs making 1 call to warnings::unimport
16
# spent 3.48ms (104µs+3.38) within JSON::Schema::Modern::Result::new which was called 2 times, avg 1.74ms/call: # once (9µs+3.30ms) by JSON::Schema::Modern::evaluate at line 393 of JSON/Schema/Modern.pm # once (95µs+81µs) by JSON::Schema::Modern::evaluate at line 177 of Sub/Defer.pm
sub new {
17 ($_QUOTED,$_UNQUOTED) if 0;
18# BEGIN quote_sub PRELUDE
19package JSON::Schema::Modern::Result;
20
# spent 6µs within JSON::Schema::Modern::Result::BEGIN@20.338 which was called: # once (6µs+0s) by Sub::Quote::_clean_eval at line 25
BEGIN {
2111µs $^H = 2018;
2210s ${^WARNING_BITS} = "UUUUUUUUUUUUUUUUUUUU";
2315µs %^H = (
24 );
251164µs16µs}
# spent 6µs making 1 call to JSON::Schema::Modern::Result::BEGIN@20.338
26# END quote_sub PRELUDE
2711µs my $invoker = CORE::shift();
2811µs my $class = CORE::ref($invoker) ? CORE::ref($invoker) : $invoker;
2910s if ($class ne "JSON::Schema::Modern::Result") {
30 if ($Moo::MAKERS{$class}) {
31 if ($Moo::MAKERS{$class}{constructor}) {
32 package JSON::Schema::Modern::Result;
33 return $invoker->SUPER::new(@_);
34 }
35 Moo->_constructor_maker_for($class);
36 return $invoker->new(@_);
37 } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) {
38 return $meta->new_object(
39 $class->can("BUILDARGS") ? $class->BUILDARGS(@_)
40 : $class->Moo::Object::BUILDARGS(@_)
41 );
42 }
43 }
44 my $args = scalar @_ == 1
45 ? CORE::ref $_[0] eq 'HASH'
4613µs ? { %{ $_[0] } }
47 : Carp::croak("Single parameters to new() must be a HASH ref"
48 . " data => ". $_[0])
49 : @_ % 2
50 ? Carp::croak("The new() method for $class expects a hash reference or a"
51 . " key/value list. You passed an odd number of arguments")
52 : {@_}
53 ;
5411µs my $new = bless({}, $class);;
55(exists $args->{"annotations"} and ($new->{"annotations"} = scalar do { my $value = do {
56 local $Method::Generate::Accessor::CurrentAttribute = {
57 init_arg => "annotations",
58 name => "annotations",
59 step => "coercion",
60 };
61 (my $_return),
62 (my $_error), (my $_old_error = $@);
63 (eval {
64 ($@ = $_old_error),
65 ($_return =
66$coerce_for_annotations->($args->{"annotations"})),
67 1
68 } or
69 $_error = CORE::ref $@ ? $@ : "coercion for \"annotations\" failed: ".$@);
70 ($@ = $_old_error),
71 (defined $_error and CORE::die $_error);
72 $_return;
73}
74;
752109µs225µs
# spent 15µs (5+10) within JSON::Schema::Modern::Result::BEGIN@75 which was called: # once (5µs+10µs) by Sub::Quote::_clean_eval at line 75
(do { no warnings "void"; package Type::Tiny; (do { package Type::Tiny; (Ref::Util::XS::is_plain_arrayref($value)) and do { my $ok = 1; for my $i (@{$value}) { ($ok = 0, last) unless (Scalar::Util::blessed($i) and $i->isa(q[JSON::Schema::Modern::Annotation])) }; $ok } }) or Type::Tiny::_failed_check($isa_check_for_annotations, "ArrayRef[InstanceOf[\"JSON::Schema::Modern::Annotation\"]]", $value, "attribute_name","annotations","attribute_step","isa check","mgaca","0","varname","\$args->{\"annotations\"}"); $value }),
# spent 15µs making 1 call to JSON::Schema::Modern::Result::BEGIN@75 # spent 10µs making 1 call to warnings::unimport
76 $value
77}
78)),
79(exists $args->{"errors"} and ($new->{"errors"} = scalar do { my $value = do {
80 local $Method::Generate::Accessor::CurrentAttribute = {
81 init_arg => "errors",
82 name => "errors",
83 step => "coercion",
84 };
85 (my $_return),
86 (my $_error), (my $_old_error = $@);
87 (eval {
88 ($@ = $_old_error),
89 ($_return =
90$coerce_for_errors->($args->{"errors"})),
91 1
92 } or
93 $_error = CORE::ref $@ ? $@ : "coercion for \"errors\" failed: ".$@);
94 ($@ = $_old_error),
95 (defined $_error and CORE::die $_error);
96 $_return;
97}
98;
99298µs220µs
# spent 13µs (6+7) within JSON::Schema::Modern::Result::BEGIN@99 which was called: # once (6µs+7µs) by Sub::Quote::_clean_eval at line 99
(do { no warnings "void"; package Type::Tiny; (do { package Type::Tiny; (Ref::Util::XS::is_plain_arrayref($value)) and do { my $ok = 1; for my $i (@{$value}) { ($ok = 0, last) unless (Scalar::Util::blessed($i) and $i->isa(q[JSON::Schema::Modern::Error])) }; $ok } }) or Type::Tiny::_failed_check($isa_check_for_errors, "ArrayRef[InstanceOf[\"JSON::Schema::Modern::Error\"]]", $value, "attribute_name","errors","attribute_step","isa check","mgaca","0","varname","\$args->{\"errors\"}"); $value }),
# spent 13µs making 1 call to JSON::Schema::Modern::Result::BEGIN@99 # spent 7µs making 1 call to warnings::unimport
100 $value
101}
102)),
103(exists $args->{"exception"} and ($new->{"exception"} = scalar do { my $value = do {
104 local $Method::Generate::Accessor::CurrentAttribute = {
105 init_arg => "exception",
106 name => "exception",
107 step => "coercion",
108 };
109 (my $_return),
110 (my $_error), (my $_old_error = $@);
111 (eval {
112 ($@ = $_old_error),
113 ($_return =
114$coerce_for_exception->($args->{"exception"})),
115 1
116 } or
117 $_error = CORE::ref $@ ? $@ : "coercion for \"exception\" failed: ".$@);
118 ($@ = $_old_error),
119 (defined $_error and CORE::die $_error);
120 $_return;
121}
122;
123279µs218µs
# spent 12µs (6+6) within JSON::Schema::Modern::Result::BEGIN@123 which was called: # once (6µs+6µs) by Sub::Quote::_clean_eval at line 123
(do { no warnings "void"; package Type::Tiny; ((Scalar::Util::blessed($value) and $value->isa(q[JSON::PP::Boolean]))) or Type::Tiny::_failed_check($isa_check_for_exception, "InstanceOf[\"JSON::PP::Boolean\"]", $value, "attribute_name","exception","attribute_step","isa check","mgaca","0","varname","\$args->{\"exception\"}"); $value }),
# spent 12µs making 1 call to JSON::Schema::Modern::Result::BEGIN@123 # spent 6µs making 1 call to warnings::unimport
124 $value
125}
126)),
127($new->{"formatted_annotations"} = scalar do { my $value = (
128 exists $args->{"formatted_annotations"}
12911µs ? $args->{"formatted_annotations"}
130 : 1);
131550µs220µs
# spent 18µs (16+2) within JSON::Schema::Modern::Result::BEGIN@131 which was called: # once (16µs+2µs) by Sub::Quote::_clean_eval at line 131
(do { no warnings "void"; package Type::Tiny; ((!ref $value and (!defined $value or $value eq q() or $value eq '0' or $value eq '1'))) or Type::Tiny::_failed_check($isa_check_for_formatted_5fannotations, "Bool", $value, "attribute_name","formatted_annotations","attribute_step","isa check","mgaca","0","varname","\$args->{\"formatted_annotations\"}"); $value }),
# spent 18µs making 1 call to JSON::Schema::Modern::Result::BEGIN@131 # spent 2µs making 1 call to warnings::unimport
132 $value
133}
134),
135($new->{"output_format"} = scalar do { my $value = (
136 exists $args->{"output_format"}
13710s ? $args->{"output_format"}
138 : "basic");
1395252µs324µs
# spent 12µs (4+8) within JSON::Schema::Modern::Result::BEGIN@139 which was called: # once (4µs+8µs) by Sub::Quote::_clean_eval at line 139
(do { no warnings "void"; package Type::Tiny; ((defined($value) and !ref($value) and $value =~ m{\A(?:(?:basic|d(?:ata_only|etailed)|flag|strict_basic|terse|verbose))\z})) or Type::Tiny::_failed_check($isa_check_for_output_5fformat, "Enum[\"flag\",\"basic\",\"strict_basic\",\"detailed\",\"verbose\",\"terse\",\"data_only\"]", $value, "attribute_name","output_format","attribute_step","isa check","mgaca","0","varname","\$args->{\"output_format\"}"); $value }),
# spent 12µs making 1 call to JSON::Schema::Modern::Result::BEGIN@139 # spent 8µs making 1 call to warnings::unimport # spent 4µs making 1 call to Type::Tiny::CORE:match
140 $value
141}
142),
14310s(exists $args->{"valid"} and ($new->{"valid"} = scalar do { my $value = do {
14412µs local $Method::Generate::Accessor::CurrentAttribute = {
145 init_arg => "valid",
146 name => "valid",
147 step => "coercion",
148 };
14911µs (my $_return),
150 (my $_error), (my $_old_error = $@);
15110s (eval {
152 ($@ = $_old_error),
153 ($_return =
154115µs120µs$coerce_for_valid->($args->{"valid"})),
155 1
156 } or
157 $_error = CORE::ref $@ ? $@ : "coercion for \"valid\" failed: ".$@);
15811µs ($@ = $_old_error),
159 (defined $_error and CORE::die $_error);
160127µs $_return;
161}
162;
1635217µs422µs
# spent 12µs (4+8) within JSON::Schema::Modern::Result::BEGIN@163 which was called: # once (4µs+8µs) by Sub::Quote::_clean_eval at line 163
(do { no warnings "void"; package Type::Tiny; ((Scalar::Util::blessed($value) and $value->isa(q[JSON::PP::Boolean]))) or Type::Tiny::_failed_check($isa_check_for_valid, "InstanceOf[\"JSON::PP::Boolean\"]", $value, "attribute_name","valid","attribute_step","isa check","mgaca","0","varname","\$args->{\"valid\"}"); $value }),
# spent 12µs making 1 call to JSON::Schema::Modern::Result::BEGIN@163 # spent 8µs making 1 call to warnings::unimport # spent 1µs making 1 call to Scalar::Util::blessed # spent 1µs making 1 call to UNIVERSAL::isa
164 $value
165}
166)),
167 (($args)[0]->{__no_BUILD__} or (
168125µs155µs $new->JSON::Schema::Modern::Result::BUILD($args),
# spent 55µs making 1 call to JSON::Schema::Modern::Result::BUILD
169 )),
170 return $new;
171 }
17213µs $$_UNQUOTED = \&new;
173}
174112µs1;
175
176;